#! /bin/sh

usage()
{
echo "Usage: gpsee-config [OPTIONS]
Options:
        [--prefix]
        [--exec-prefix]
        [--includedir]
        [--libdir]
        [--version]
        [--libs]
        [--ldflags]
        [--cc]
        [--cxx]
        [--cflags]
        [--cppflags]
        [--cxxflags]
        [--lib-filenames]
	[--gpsee-src]
	[--spidermonkey-build]
	[--spidermonkey-src]
	[--outside.mk]
	[--gcc-prefix]
	[--stream]"
}

case "$1" in
	""|"-h"|"--help")
		usage
		exit 1
	;;
esac

while [ "$1" ]
do
  case "$1" in
    "--prefix")
	echo "@@GPSEE_PREFIX_DIR@@"
	;;
    "--exec-prefix")
        echo "@@BIN_DIR@@"
	;;
    "--includedir")
	echo "@@INCLUDE_DIR@@"
	;;
    "--libdir")
	echo "@@SOLIB_DIR@@"
	;;
    "--version")
        echo "@@GPSEE_RELEASE@@"
	;;
    "--libs")
	echo "@@LOADLIBES@@"
	;;
    "--ldflags")
	echo "@@LDFLAGS@@"
	;;
    "--cc")
	echo "@@CC@@"
	;;
    "--cxx")
	echo "@@CXX@@"
	;;
    "--cppflags")
	echo "-I@@INCLUDE_DIR@@ @@CPPFLAGS@@"
	;;
    "--cxxflags")
	echo "@@CXXFLAGS@@"
	;;
    "--lib-filenames")
        echo "@@EXPORT_LIBS@@"
	;;
    "--gpsee-src")
        echo "@@GPSEE_SRC@@"
	;;
    "--spidermonkey-src")
        echo "@@SPIDERMONKEY_SRC@@"
	;;
    "--spidermonkey-build")
        echo "@@SPIDERMONKEY_BUILD@@"
	;;
    "--outside.mk")
        echo "@@OUTSIDE_MK@@"
	;;
    "--gcc-prefix")
        echo "@@GCC_PREFIX@@"
	;;
    "--stream")
        echo "@@STREAM@@"
	;;
    *)
	echo "Error: invalid option $1" >/dev/stderr
	exit 1
	;;
  esac
  shift
done

